<template>
  <el-dialog title="文章分类" :visible.sync="visible" v-if="visible">
    <el-tag type="success" style="margin: 10px" v-for="item in categoryList" :key="item.categoryId">
      {{ item.categoryName }}
    </el-tag>
    <div slot="footer">
      <el-button type="primary" @click="visible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'ArticleCategory',
  data () {
    return {
      visible: false
    }
  },
  props: {
    categoryList: {
      required: true,
      type: Array
    }
  },
  methods: {
    init () {
      this.visible = true
    }
  }
}
</script>

<style scoped>

</style>
